// eslint-disable-next-line max-classes-per-file
import { JsonProperty, Serializable } from '@/plugins/reflect-metadata';

@Serializable()
export class Item {
  @JsonProperty('id')
    id: number = 0;

  @JsonProperty('cname')
    cname: string = '';

  @JsonProperty('country_id')
    countryId: string = '';
}

@Serializable()
export class CountryItem {
  @JsonProperty({ name: 'common', type: Item })
    common: Item[] = [];

  @JsonProperty({ name: 'others', type: Item })
    others: Item[] = [];
}

@Serializable()
export default class CaptchaList {
  @JsonProperty({ name: 'country_list', type: CountryItem })
    countryList: CountryItem = {
      common: [],
      others: [],
    };
}
